home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / tvtool2.zip / TV3D.INT < prev    next >
Text File  |  1993-07-20  |  6KB  |  222 lines

  1. UNIT Tv3D;
  2. {$B+}
  3. {$X+}
  4. {$V-}
  5.  
  6. {$I TVDEFS.INC}
  7.  
  8. INTERFACE
  9.  
  10.  
  11. USES
  12.   TvType,
  13.   App, Dialogs, Drivers, Objects, Views;
  14.  
  15.  
  16. CONST
  17.   {** 3D Dialog Palette **}
  18.   { 1  = Frame normal }
  19.   { 2  = Frame passive }
  20.   { 3  = Frame icon }
  21.   { 4  = ScrollBar page area }
  22.   { 5  = ScrollBar controls }
  23.   { 6  = StaticText }
  24.   { 7  = Label normal }
  25.   { 8  = Label selected }
  26.   { 9  = Label shortcut }
  27.   { 10 = Button normal }
  28.   { 11 = Button text }
  29.   { 12 = Button disabled text }
  30.   { 13 = Button shortcut text }
  31.   { 14 = Button shaded }
  32.   { 15 = Button default text }
  33.   { 16 = Cluster normal text }
  34.   { 17 = Cluster selected text }
  35.   { 18 = Cluster shortcut }
  36.   { 19 = Inputline normal }
  37.   { 20 = Inputline selected text }
  38.   { 21 = Inputline arrow }
  39.   { 22 = History arrow }
  40.   { 23 = History normal }
  41.   { 24 = HistoryWindow scrollbar page area }
  42.   { 25 = HistoryWindow scrollbar controls }
  43.   { 26 = ListViewer normal }
  44.   { 27 = ListViewer focused }
  45.   { 28 = ListViewer selected }
  46.   { 29 = ListViewer divider }
  47.   { 30 = InfoPane }
  48.   { 31 = Cluster disabled }
  49.   { 32 = Reserved }
  50.   { 33 = Outline normal }
  51.   { 34 = Outline shaded }
  52.   { 35 = History shaded }
  53.   C3DDialog     = #137#139#140#165#166#167#168#169#170#141 +
  54.                   #142#143#144#145#146#152#153#154#149#150 +
  55.                   #151#160#161#163#164#156#157#158#159#171 +
  56.                   #155#000#147#148#162;
  57.  
  58.  
  59.   {** 3D Button Palette **}
  60.   { 1 = Button normal }
  61.   { 2 = Button shaded }
  62.   { 3 = Button text }
  63.   { 4 = Button disabled text}
  64.   { 5 = Button shortcut text}
  65.   { 6 = Button default text }
  66.   C3DButton     = #10#14#11#12#13#15;
  67.  
  68.  
  69.   {** 3D History Palette **}
  70.   { 1 = History arrow }
  71.   { 2 = History normal }
  72.   { 3 = History shaded }
  73.   C3DHistory    = #22#23#35;
  74.  
  75.  
  76.   {** 3D Outline Palette **}
  77.   { 1 = Outline normal }
  78.   { 2 = Outline shaded }
  79.   C3DOutline    = #33#34;
  80.  
  81.   {** 3D Tool Button Palette **}
  82.   { 1 = Button normal }
  83.   { 2 = Button shaded }
  84.   { 3 = Button text }
  85.   { 4 = Button disabled text}
  86.   { 5 = Button shortcut text}
  87.   { 6 = Button default text }
  88.   C3DToolButton = #10#14#11#12#11#11;
  89.  
  90.  
  91. CONST
  92.   ButtonSelect  : TbxFrameArray = '╔╗╚╝║║══';
  93.   ButtonNormal  : TbxFrameArray = '┌┐└┘││──';
  94.   ButtonPress   : TbxFrameArray = '┌┐└┘││──';
  95.   OutlineNormal : TbxFrameArray = '┌┐└┘││──';
  96.  
  97.  
  98. TYPE
  99.   Pbx3DButton = ^Tbx3DButton;
  100.   Tbx3DButton = Object(TButton)
  101.     Down : Boolean;
  102.  
  103.     Constructor Init(var Bounds   : TRect;
  104.                          ATitle   : TTitleStr;
  105.                          ACommand : Word;
  106.                          AFlags   : Word);
  107.     Constructor Load(var S: TStream);
  108.     Procedure   Draw;                                     Virtual;
  109.     Procedure   DrawTitle(ATitle: TTitleStr;
  110.                           Color : Word;
  111.                           Row   : Word);                  Virtual;
  112.     Procedure   GetFrame(var F : TbxFrameArray);          Virtual;
  113.     Function    GetPalette: PPalette;                     Virtual;
  114.     Procedure   HandleEvent(var Event : TEvent);          Virtual;
  115.   end;
  116.  
  117.  
  118.   Pbx3DOutline  = ^Tbx3DOutline;
  119.   Tbx3DOutline  = Object(TView)
  120.     Constructor Init(var Bounds : TRect);
  121.     Procedure   Draw;                                     Virtual;
  122.     Procedure   GetFrame(var F : TbxFrameArray);          Virtual;
  123.     Function    GetPalette: PPalette;                     Virtual;
  124.   end;
  125.  
  126.  
  127.   Pbx3DHistory  = ^Tbx3DHistory;
  128.   Tbx3DHistory  = Object(THistory)
  129.     Constructor Init(var Bounds     : TRect;
  130.                          ALink      : PInputLine;
  131.                          AHistoryId : Word);
  132.     Procedure   Draw;                                     Virtual;
  133.     Function    GetPalette: PPalette;                     Virtual;
  134.   end;
  135.  
  136.  
  137.   Pbx3DDialog = ^Tbx3DDialog;
  138.   Tbx3DDialog = Object(TDialog)
  139.     Function    GetPalette: PPalette;                     Virtual;
  140.     Procedure   Insert(P : PView);                        Virtual;
  141.   end;
  142.  
  143.  
  144.   Pbx3DToolButton = ^Tbx3DToolButton;
  145.   Tbx3DToolButton = Object(Tbx3DButton)
  146.     Procedure   GetFrame(var F : TbxFrameArray);          Virtual;
  147.     Function    GetPalette: PPalette;                     Virtual;
  148.   end;
  149.  
  150.  
  151.   Pbx3DToolBar  = ^Tbx3DToolBar;
  152.   Tbx3DToolBar  = Object(Tbx3DDialog)
  153.     IsVertical  : Boolean;
  154.     LastX       : Word;
  155.     LastY       : Word;
  156.  
  157.     Constructor Init(var Bounds  : TRect;
  158.                          Vertical: Boolean);
  159.     Constructor Load(var S: TStream);
  160.     Procedure   AddTool(ATitle   : TTitleStr;
  161.                         ACommand : Word);
  162.     Procedure   InitFrame;                                Virtual;
  163.     Procedure   SizeLimits(var Min, Max : TPoint);        Virtual;
  164.     Procedure   Store(var S: TStream);
  165.   end;
  166.  
  167.  
  168. { Tv3D registration procedure }
  169.  
  170. Procedure RegisterTV3D;
  171.  
  172. { Stream Registration Records }
  173.  
  174. CONST
  175.   Rbx3DButton: TStreamRec = (
  176.     ObjType : 5000;
  177.     VmtLink : Ofs(TypeOf(Tbx3DButton)^);
  178.     Load    : @Tbx3DButton.Load;
  179.     Store   : @Tbx3DButton.Store
  180.   );
  181.  
  182. CONST
  183.   Rbx3DOutline: TStreamRec = (
  184.     ObjType : 5001;
  185.     VmtLink : Ofs(TypeOf(Tbx3DOutline)^);
  186.     Load    : @Tbx3DOutline.Load;
  187.     Store   : @Tbx3DOutline.Store
  188.   );
  189.  
  190. CONST
  191.   Rbx3DHistory: TStreamRec = (
  192.     ObjType : 5002;
  193.     VmtLink : Ofs(TypeOf(Tbx3DHistory)^);
  194.     Load    : @Tbx3DHistory.Load;
  195.     Store   : @Tbx3DHistory.Store
  196.   );
  197.  
  198. CONST
  199.   Rbx3DDialog: TStreamRec = (
  200.     ObjType : 5003;
  201.     VmtLink : Ofs(TypeOf(Tbx3DDialog)^);
  202.     Load    : @Tbx3DDialog.Load;
  203.     Store   : @Tbx3DDialog.Store
  204.   );
  205.  
  206. CONST
  207.   Rbx3DToolButton: TStreamRec = (
  208.     ObjType : 5004;
  209.     VmtLink : Ofs(TypeOf(Tbx3DToolButton)^);
  210.     Load    : @Tbx3DToolButton.Load;
  211.     Store   : @Tbx3DToolButton.Store
  212.   );
  213.  
  214. CONST
  215.   Rbx3DToolBar: TStreamRec = (
  216.     ObjType : 5005;
  217.     VmtLink : Ofs(TypeOf(Tbx3DToolBar)^);
  218.     Load    : @Tbx3DToolBar.Load;
  219.     Store   : @Tbx3DToolBar.Store
  220.   );
  221.  
  222.